<script>
	$('.uploadarea').hover(function(){
		$('#uploaddrag').fadeOut();
    });
    $('.tabnew').click(function () {
        var tabid = $(this).attr('index');
        $('.tabnew').css('background-color','#CCC');
        $('.tabnew').css('color','#666');
        $(this).css('background-color','#047DBF');
        $(this).css('color','#fff');
        $('#tab_detail1').load('request.php?tab=' + tabid);
    });
	$('.tabcls').click(function () {
        var tabid = $(this).attr('index');
        $('.tabcls').css('background-color','#CCC');
        $('.tabcls').css('color','#666');
        $(this).css('background-color','#047DBF');
        $(this).css('color','#fff');
        $('#tab_detail3').load('request.php?tab=' + tabid);
    });
    $('.tabrank').click(function () {
        var tabid = $(this).attr('index');
        $('.tabrank').css('background-color', '#CCC');
        $('.tabrank').css('color','#666');
        $(this).css('background-color','#047DBF');
        $(this).css('color', '#fff');
        $('#tab_detail2').load('request.php?tab=' + tabid);
    });
    $('.items').click(function(){
        var cid = $(this).attr('song');
        $('.items').css('font-weight','100');
        $(this).css('font-weight','bold');
        $('#player').load('request.php?song=' + cid);
        $('#info').load('request.php?info=' + cid);
    });
	
	$('#uploadfancy').fancybox({
		fitToView	: false,
		width		: '95%',
		height		: '95%',
		autoSize	: true,
		closeClick	: false,
		openEffect	: 'elastic',
		closeEffect	: 'elastic'
	});
	$('#loginfancy').fancybox({
		fitToView	: false,
		width		: '95%',
		height		: '95%',
		autoSize	: true,
		closeClick	: false,
		openEffect	: 'elastic',
		closeEffect	: 'elastic'
	});
    
    $('#logoutfancy').fancybox({
		fitToView	: false,
		width		: '95%',
		height		: '95%',
		autoSize	: true,
		closeClick	: false,
		openEffect	: 'elastic',
		closeEffect	: 'elastic'
	});
	
	$('.listitem1').click(function(){
		var id1 = $(this ).attr('artistid');
		if (document.getElementById('box1'+id1).checked)
				document.getElementById('box1'+id1).checked=false;			
		 else document.getElementById('box1'+id1).checked=true;
    });
	
	$('.listitem2').click(function(){
		var id2 = $(this ).attr('authorid');
		if (document.getElementById('box2'+id2).checked)
			document.getElementById('box2'+id2).checked=false;
		 else document.getElementById('box2'+id2).checked=true;
    });
</script>